{# Overseer's home as a map (overseer_map.layout, ``?view=map``): each process a node at its place in its tier, linking to its page, with its state and its containers' CPU and memory; the connections between them as lines (in the tone of what each leads to, dashed for queued work, dotted for a key Secrets holds); data in its shape (a store, the queue, object storage: a glyph here, the outline opened up); what runs in the webserver as chips in the Server's node, two to a row, each with its cost to load (load_cost). Its links swap ``map_target`` (the main area; a table's, in Database > Tables). Rendered in the page and again for each frame. #} {% from "components/macros/layout.html" import chip, health_badge, hint_panel, status_dot %} {% from "components/macros/icons.html" import icon %} {% from "pages/overseer/_glance_macros.html" import cause, figures %} {% from "pages/overseer/_macros.html" import line_link, todos %} {# A node's name, linking to its page; plain for what has none: a piece of a service opened up in full, an outside provider muted. #} {% macro node_title(node, size="") -%} {% if node.url %}{{ node.title }} {%- else %}{{ node.title }}{% endif %} {%- endmacro %} {# Open a node up: the Server into what runs in it, a service into its pieces. #} {% macro zoom_link(node) -%} {% if node.zoom %}{{ icon("zoom-in", "w-4 h-4") }}Open up {{ node.title }}{% endif %} {%- endmacro %} {% if map_trail %} {# Opened up (overseer_zoom: the Server, a service in it): the way back up a level at a time. #} {% endif %} {% if map_overlays %} {# What tones the nodes instead of their health (overseer_heat), and what it shows. #} {% endif %} {% if map_rail %} {# What nearly every piece uses (overseer_zoom.RAIL): a rail, not a line from each; hovering one outlines every piece that uses it. #}
Used throughout {% for dep in map_rail %}{% if dep.status %}{{ status_dot(dep.status) }}{% endif %}{{ dep.title }}{% endfor %}
{% endif %} {% set line_key = map_line_key|default({}) %} {% set flagged = map_links|selectattr("why", "defined")|map(attribute="tone")|select("in", line_key)|unique|sort|list %} {% if flagged %} {# What a red or amber line means (overseer_zoom.LINE_KEY), only those drawn; each line says its own why on hover (a plain one too: a key's details). #}

{% for tone in flagged %}{{ line_key[tone] }}{% endfor %} Hover a line for why

{% endif %} {# At least the rest of the window (map-fill; the Flow scrolls sideways, so keeps its own height), the lines' viewBox stretching with it. #}
{# A line's label at its middle, always shown (a key's details, at a glance; the whole of it on hover). #} {% for link in map_links %}{% if link.label %}{{ link.label }}{% endif %}{% endfor %} {# A flagged line's why, in a panel at its middle while it is hovered. #} {% for link in map_links %}{% if link.why %} {% call hint_panel('data-line-hint="' ~ loop.index ~ '"', "-translate-x-1/2 pt-1.5 pointer-events-none", "left: " ~ link.mid.left ~ "%; top: " ~ (link.mid.top / map_height * 100) ~ "%") %}{{ link.why|message }}{% endcall %} {% endif %}{% endfor %} {% for lane in map_lanes %}

{{ lane.label }}

{% endfor %} {% for node in map_nodes %} {% if map_compact %} {# Its dot and name, under them its cost to load and what it carries (a heat's figure); data in its outline (the stroke takes the tone, as a border does), an outside provider a dashed pill. What it says, why it fails and the fix (a key's set dialog), under it on hover (CSS, so a live frame cannot close it; padded, not spaced, so the pointer can move into it). #} {% set outside = node.role == map_roles.OUTSIDE %} {% set shaped = node.role and not outside %} {% set outline = "" if shaped else ("rounded-full items-center border border-dashed bg-aegis-card" if outside else ("rounded-lg border border-dashed" if node.missing else "rounded-lg border bg-aegis-card")) %}
{% if shaped %}{% endif %} {% if node.status %}{{ status_dot(node.status) }}{% endif %}{{ node_title(node, "text-base") }}{{ zoom_link(node) }} {% if node.load or node.figure %} {% if node.load %}{{ node.load }}{% endif %} {% if node.figure %}{{ node.figure }}{% endif %} {% endif %} {% if node.badges %}{% for badge_title in node.badges %}{{ badge_title }}{% endfor %}{% endif %} {% if node.todo %}{{ node.todo_count }} to fix{% endif %} {% call hint_panel("data-hint", ("right-0" if node.hint_end else "left-0") ~ " " ~ ("bottom-full pb-1.5" if node.hint_above else "top-full pt-1.5") ~ " group-hover:block") %}{{ node.message|message }}{% if node.holds %}
    {% for held in node.holds %}
  • {% if held.url %}{{ held.name }}{% else %}{{ held.name }}{% endif %}
  • {% endfor %}{% if node.holds_more %}
  • {{ node.holds_more }} more
  • {% endif %}
{% endif %}{% if node.reaches %}Uses {{ node.reaches|join(", ") }}{% endif %}{% if node.note %}{{ node.note }}{% endif %}{{ cause(node) }} {{ todos(node.todo) }} {% for fix in node.fix or [] %}{% endfor %}{% endcall %}
{% else %}
{% if node.role %}{{ icon(node.role, "w-4 h-4 shrink-0 text-aegis-muted") }}{% endif %} {{ node_title(node, "text-base") }} {{ zoom_link(node) }} {% if node.status %}{{ health_badge(node.status) }}{% endif %}
{% if node.heat %}

{{ node.figure }}

{% endif %} {{ cause(node) }} {% if node.glance %} {% for row in node.glance.rows[:2] %}
{{ figures(row) }}
{% endfor %} {% else %}

{{ node.message|message }}

{% endif %} {% if node.note %}

{{ node.note }}

{% endif %} {% if node.hosted %} {% endif %}
{% endif %} {% endfor %}